-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the "safe_name" attribute of PackageFile for backwards compatibility #745
Conversation
e5641cf
to
57a19f3
Compare
CC: @bhrutledge @jaraco |
0027889
to
92c78cb
Compare
Commit 0bd26af introduced a regression that was causing some namespace packages with dots in them fail to upload to PyPI. The reason is because `packaging.utils.canonicalize_name()` is not equivalent to `pkg_resources.safe_name()` as the former transforms the "." into "-", while the later only does it for non-alphanumeric/. characters. Closes: pypa#743
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix, test, and changelog! One small suggestion for the docstring, and I'd still like to get sign-off from the Twine maintainer that made the original change.
Co-authored-by: Brian Rutledge <brian@bhrutledge.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. This was my original instinct before converting to canonicalize name. Does this change remove the last dependency on packaging?
It seems so. I would recommend doing the removal in a different change to keep things clean but I can push some commit to remove |
Thanks @pablogsal. I'm going to merge this, then follow up with the removal of |
Commit 0bd26af introduced a regression
that was causing some namespace packages with dots in them fail to
upload to PyPI. The reason is because
packaging.utils.canonicalize_name()
is not equivalent topkg_resources.safe_name()
as the former transforms the "." into "-",while the later only does it for non-alphanumeric/. characters.
Closes: #743